package com.bosssoft.trainee.mbg.po;

import com.baomidou.mybatisplus.annotation.*;
import com.bosssoft.trainee.mbg.util.handler.ListOfIntegerHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @Author: wuxin
 * @Date: 2022/6/12
 * @Project rbac
 * @Version 1.0
 * @Description
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_role")
public class Role{
    @TableId(value = "r_id",type = IdType.AUTO)
    private Integer  id;
    @TableField(value = "r_name")
    private String name;
    @TableField(value = "r_code")
    private String code;
    @TableField(value = "r_company_id")
    private Integer companyId;
    @TableField(value = "r_department_id")
    private Integer departmentId;
    @TableField(value = "r_note")
    private String note;
    @TableField(value = "r_state")
    private Integer state;
    @TableField(value = "r_resources",typeHandler = ListOfIntegerHandler.class)
    private List<Integer> resources;
    @TableField(value = "r_update_time",fill = FieldFill.INSERT_UPDATE)
    @Version
    private Date updateTime;
}
